/*
 * Copyright (c) 2021. Moses All Right Reserved
 */

package com.moses.design_patterns.bride;

/**
 * @author Moses
 * @email shenhuohui@gmail.com
 * @date 2021/4/17 10:32
 */
// 抽象父类
public abstract class AbstractFather {
    // 1. 通过聚合关系，把易变的行为添加到类中
    // 2. 或把子类不需要的抽离到实现类，需要时再用
    private Implementor implementor;
    public AbstractFather(Implementor implementor){
        this.implementor = implementor;
    }

    // 获取实现类，方便在子类中实现，或修改成员变量访问修饰符
    public Implementor getImplementor(){
        return this.implementor;
    }

    public abstract void stableMethod1();

    public abstract void stableMethod2();
}
